package com.zijin.exec;

public class Text10 {
    public static void main(String[] args) {
        System.out.println("1-1000范围内的水仙花数有：");
        for (int i = 100; i < 1000; i++) {
            int hundreds = i / 100;
            int tens = (i / 10) % 10;
            int units = i % 10;
            if (i == Math.pow(hundreds, 3) + Math.pow(tens, 3) + Math.pow(units, 3)) {
                System.out.print(i+" ");
            }
        }
    }
}
